using UnityEngine;

public class ButtonInset : MonoBehaviour
{
	[SerializeField]
	private UISprite choosedInsetSprite;

	[SerializeField]
	private UISprite insetSprite;

	[SerializeField]
	private GameObject window;

	[SerializeField]
	private UILabel label;

	private void OnClick()
	{
		ButtonInsetController.instance.OpenInset(this);
	}

	public void ActivateInset(bool val)
	{
		choosedInsetSprite.gameObject.SetActive(val);
		insetSprite.gameObject.SetActive(!val);
		window.SetActive(val);
	}

	public void SetName(string nameInset)
	{
		label.text = nameInset;
	}

	public void SetWindow(GameObject go)
	{
		window = go;
	}
}
